package com.itbaizhan.config;

import lombok.Data;

import org.springframework.boot.context.properties.ConfigurationProperties;

/*读取application.yml里的数据源配置,
 * 第一个数据库 ,master
 * 在主启动类添加@EnableConfigurationProperties，否则@ConfigurationProperties会报错
 * @EnableConfigurationProperties(value = {DBConfig1.class, DBConfig2.class})*/

@Data
@ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.master")
public class DBConfig1 {

    private String url;
    private String username;
    private String password;
    private String driverClassName;
}
